<template>
  <div class="not-found-page">
    <div class="not-found-container">
      <div class="not-found-content">
        <div class="error-code">404</div>
        <div class="error-title">页面不存在</div>
        <div class="error-description">
          抱歉，您访问的页面不存在或已被移除
        </div>
        <div class="error-actions">
          <el-button type="primary" @click="goHome">
            <el-icon><House /></el-icon>
            返回首页
          </el-button>
          <el-button @click="goBack">
            <el-icon><Back /></el-icon>
            返回上页
          </el-button>
        </div>
      </div>
      <div class="illustration">
        <el-icon class="illustration-icon"><Document /></el-icon>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { House, Back, Document } from '@element-plus/icons-vue'

const router = useRouter()

const goHome = () => {
  router.push('/scoring/new')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped>
.not-found-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.not-found-container {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 800px;
  padding: 40px;
}

.not-found-content {
  flex: 1;
}

.error-code {
  font-size: 120px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #fff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.error-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
}

.error-description {
  font-size: 16px;
  opacity: 0.8;
  margin-bottom: 40px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 16px;
}

.illustration {
  flex-shrink: 0;
}

.illustration-icon {
  font-size: 160px;
  opacity: 0.3;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .not-found-container {
    flex-direction: column;
    gap: 40px;
    text-align: center;
    padding: 20px;
  }

  .error-code {
    font-size: 80px;
  }

  .error-title {
    font-size: 24px;
  }

  .error-description {
    font-size: 14px;
    margin-bottom: 32px;
  }

  .error-actions {
    justify-content: center;
  }

  .illustration-icon {
    font-size: 120px;
  }
}

/* Element Plus 样式覆盖 */
:deep(.el-button) {
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 16px;
}

:deep(.el-button--primary) {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

:deep(.el-button--primary:hover) {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

:deep(.el-button:not(.el-button--primary)) {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

:deep(.el-button:not(.el-button--primary):hover) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
}
</style>